package com.cz.ssyx.user.api;

import com.cz.ssyx.user.service.UserService;
import com.cz.ssyx.vo.user.LeaderAddressVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @descriptions: 远程调用接口：获取会员和团长的信息
 * @author: Joker.
 * @date: 2024/4/24 23:48
 * @version: 1.0
 */

@RestController
@RequestMapping("/api/user/leader")
public class LeaderAddressApiController {

    @Autowired
    private UserService userService;

    @GetMapping("/inner/getUserAddressByUserId/{userId}")
    public LeaderAddressVo getUserAddressByUserId(@PathVariable("userId") Long userId) {
        LeaderAddressVo leaderAddressVo = userService.getLeaderAddressByUserId(userId);
        return leaderAddressVo;
    }
}
